#ifndef hal_current_H
#define hal_current_H

#include <cfg_param.h>
#include <stdint.h>

// 通道2采集TA工作电流还是测路PD电流
/*typedef enum
{
    SAMPCUR_TYPE_WORK_CURRENT,
    SAMPCUR_TYPE_PD_CURRENT
} SampCurTypeEn;*/

typedef enum
{
    SAMPCUR_TYPE_WORK_CURRENT,
		SAMPCUR_TYPE_WORK_VOLTAGE,
    SAMPCUR_TYPE_PD_CURRENT
} SampCurTypeEn;

void hal_CurrentInit();

/*void hal_SeedCurrentSlowChange(float TargetCurrent, int SplitCurrent);

void hal_SeedCurrentDirectChange(float TargetCurrent,SampCurTypeEn SampCurType);*/



void hal_SeedCurrentSlowChange(float TargetCurrent, int SplitCurrent, int LaserNumber);

void hal_SeedCurrentDirectChange(float TargetCurrent, int LaserNumber);



void hal_PDCurrentSlowChange(float TargetCurrent);

void hal_PDCurrentDirectChange(float TargetCurrent);

float hal_ADS1119I2cCurrentRegtomA(uint16_t current_V, int LaserNumber, SampCurTypeEn SampCurType);

void hal_TACurrentSlowChange(float TargetCurrent,SampCurTypeEn SampCurType);

void hal_TACurrentDirectChange(float TargetCurrent,SampCurTypeEn SampCurType);

//uint16_t hal_DAC5541SpiCurrentmAToReg(float Current, int LaserNumber,SampCurTypeEn SampCurType);

uint16_t hal_DAC5541SpiCurrentmAToReg(float Current, int LaserNumber);

#endif
